Analysing speech signals

ABSTRACT

A method of analysis of an audio signal comprises: receiving an audio signal representing speech; extracting first and second components of the audio signal representing first and second acoustic classes of the speech respectively; analyzing the first and second components of the audio signal with models of the first and second acoustic classes of the speech of an enrolled user. Based on the analyzing, information is obtained information about at least one of a channel and noise affecting the audio signal.

TECHNICAL FIELD

Embodiments described herein relate to methods and devices for analyzing speech signals.

BACKGROUND

Many devices include microphones, which can be used to detect ambient sounds. In many situations, the ambient sounds include the speech of one or more nearby speaker. Audio signals generated by the microphones can be used in many ways. For example, audio signals representing speech can be used as the input to a speech recognition system, allowing a user to control a device or system using spoken commands.

SUMMARY

According to an aspect of the present invention, there is provided a method of analysis of an audio signal, the method comprising: receiving an audio signal representing speech; extracting first and second components of the audio signal representing first and second acoustic classes of the speech respectively; analyzing the first and second components of the audio signal with models of the first and second acoustic classes of the speech of an enrolled user; and based on said analyzing, obtaining information about at least one of a channel and noise affecting said audio signal.

According to another aspect of the present invention, there is provided a system for analyzing an audio signal, configured for performing the method.

According to another aspect of the present invention, there is provided a device comprising such a system. The device may comprise a mobile telephone, an audio player, a video player, a mobile computing platform, a games device, a remote controller device, a toy, a machine, or a home automation controller or a domestic appliance.

According to another aspect of the present invention, there is provided a computer program product, comprising a computer-readable tangible medium, and instructions for performing a method according to the first aspect.

According to another aspect of the present invention, there is provided a non-transitory computer readable storage medium having computer-executable instructions stored thereon that, when executed by processor circuitry, cause the processor circuitry to perform a method according to the first aspect.

According to a further aspect of the invention, there is provided a method of determining whether a received signal may result from a replay attack, the method comprising:

-   -   receiving an audio signal representing speech;     -   obtaining information about a channel affecting said audio         signal; and     -   determining whether the channel has at least one characteristic         of a loudspeaker.

The step of determining whether the channel has at least one characteristic of a loudspeaker may comprise:

-   -   determining whether the channel has a low frequency roll-off.

The step of determining whether the channel has a low frequency roll-off may comprise determining whether the channel decreases at a constant rate for frequencies below a lower cut-off frequency.

The step of determining whether the channel has at least one characteristic of a loudspeaker may comprise:

-   -   determining whether the channel has a high frequency roll-off.

The step of determining whether the channel has a high frequency roll-off may comprise determining whether the channel decreases at a constant rate for frequencies above an upper cut-off frequency.

The step of determining whether the channel has at least one characteristic of a loudspeaker may comprise:

-   -   determining whether the channel has ripple in a pass-band         thereof.

The step of determining whether the channel has ripple in a pass-band thereof may comprise determining whether a degree of ripple over a central part of the pass-band, for example from 100 Hz-10 kHz, exceeds a threshold amount.

According to a further aspect of the invention, there is provided a system for determining whether a received signal may result from a replay attack, the system comprising an input for receiving an audio signal, and being configured for:

-   -   receiving an audio signal representing speech;     -   obtaining information about a channel affecting said audio         signal; and     -   determining whether the channel has at least one characteristic         of a loudspeaker.

According to a further aspect of the invention, there is provided a device comprising such a system. The device may comprise a mobile telephone, an audio player, a video player, a mobile computing platform, a games device, a remote controller device, a toy, a machine, or a home automation controller or a domestic appliance.

According to a further aspect of the invention, there is provided a computer program product, comprising a computer-readable tangible medium, and instructions for performing a method according to a previous aspect.

According to a further aspect of the invention, there is provided a non-transitory computer readable storage medium having computer-executable instructions stored thereon that, when executed by processor circuitry, cause the processor circuitry to perform a method according to a previous aspect.

BRIEF DESCRIPTION OF DRAWINGS

For a better understanding of the present invention, and to show how it may be put into effect, reference will now be made to the accompanying drawings, in which:

FIG. 1 illustrates a smartphone;

FIG. 2 is a schematic diagram, illustrating the form of the smartphone;

FIG. 3 is a flow chart illustrating a method of analyzing an audio signal;

FIG. 4 is a block diagram illustrating a system for analyzing an audio signal;

FIG. 5 illustrates results in the method of FIG. 3;

FIG. 6 is a block diagram illustrating an alternative system for analyzing an audio signal;

FIG. 7 is a block diagram illustrating a further alternative system for analyzing an audio signal;

FIG. 8 is a block diagram illustrating a further alternative system for analyzing an audio signal;

FIG. 9 illustrates a possible relay attack on a voice biometric system;

FIG. 10 illustrates an effect of a replay attack; and

FIG. 11 is a flow chart illustrating a method of detecting a replay attack.

DETAILED DESCRIPTION OF EMBODIMENTS

The description below sets forth example embodiments according to this disclosure. Further example embodiments and implementations will be apparent to those having ordinary skill in the art. Further, those having ordinary skill in the art will recognize that various equivalent techniques may be applied in lieu of, or in conjunction with, the embodiments discussed below, and all such equivalents should be deemed as being encompassed by the present disclosure.

The methods described herein can be implemented in a wide range of devices and systems. However, for ease of explanation of one embodiment, an illustrative example will be described, in which the implementation occurs in a smartphone.

FIG. 1 illustrates a smartphone 10, having a microphone 12 for detecting ambient sounds. In normal use, the microphone is of course used for detecting the speech of a user who is holding the smartphone 10 close to their face.

FIG. 2 is a schematic diagram, illustrating the form of the smartphone 10.

Specifically, FIG. 2 shows various interconnected components of the smartphone 10. It will be appreciated that the smartphone 10 will in practice contain many other components, but the following description is sufficient for an understanding of the present invention.

Thus, FIG. 2 shows the microphone 12 mentioned above. In certain embodiments, the smartphone 10 is provided with multiple microphones 12, 12 a, 12 b, etc.

FIG. 2 also shows a memory 14, which may in practice be provided as a single component or as multiple components. The memory 14 is provided for storing data and program instructions.

FIG. 2 also shows a processor 16, which again may in practice be provided as a single component or as multiple components. For example, one component of the processor 16 may be an applications processor of the smartphone 10.

FIG. 2 also shows a transceiver 18, which is provided for allowing the smartphone 10 to communicate with external networks. For example, the transceiver 18 may include circuitry for establishing an internet connection either over a WiFi local area network or over a cellular network.

FIG. 2 also shows audio processing circuitry 20, for performing operations on the audio signals detected by the microphone 12 as required. For example, the audio processing circuitry 20 may filter the audio signals or perform other signal processing operations.

In this embodiment, the smartphone 10 is provided with voice biometric functionality, and with control functionality. Thus, the smartphone 10 is able to perform various functions in response to spoken commands from an enrolled user. The biometric functionality is able to distinguish between spoken commands from the enrolled user, and the same commands when spoken by a different person. Thus, certain embodiments of the invention relate to operation of a smartphone or another portable electronic device with some sort of voice operability, for example a tablet or laptop computer, a games console, a home control system, a home entertainment system, an in-vehicle entertainment system, a domestic appliance, or the like, in which the voice biometric functionality is performed in the device that is intended to carry out the spoken command. Certain other embodiments relate to systems in which the voice biometric functionality is performed on a smartphone or other device, which then transmits the commands to a separate device if the voice biometric functionality is able to confirm that the speaker was the enrolled user.

In some embodiments, while voice biometric functionality is performed on the smartphone 10 or other device that is located close to the user, the spoken commands are transmitted using the transceiver 18 to a remote speech recognition system, which determines the meaning of the spoken commands. For example, the speech recognition system may be located on one or more remote server in a cloud computing environment. Signals based on the meaning of the spoken commands are then returned to the smartphone 10 or other local device.

Methods described herein proceed from the recognition that different parts of a user's speech have different properties.

Specifically, it is known that speech can be divided into voiced sounds and unvoiced or voiceless sounds. A voiced sound is one in which the vocal cords of the speaker vibrate, and a voiceless sound is one in which they do not.

It is now recognized that the voiced and unvoiced sounds have different frequency properties, and that these different frequency properties can be used to obtain useful information about the speech signal.

FIG. 3 is a flow chart, illustrating a method of analyzing an audio signal, and FIG. 4 is a block diagram illustrating functional blocks in the analysis system.

Specifically, in step 50 in the method of FIG. 3, an audio signal, which is expected to contain speech, is received on an input 70 of the system shown in FIG. 4.

The received signal is divided into frames, which may for example have lengths in the range of 10-100 ms, and then passed to a voiced/unvoiced detection block 72. Thus, in step 52 of the process, first and second components of the audio signal, representing different first and second acoustic classes of the speech, are extracted from the received signal. Extracting the first and second components of the audio signal may comprise identifying periods when the audio signal contains the first acoustic class of speech, and identifying periods when the audio signal contains the second acoustic class of speech. More specifically, extracting the first and second components of the audio signal may comprise identifying frames of the audio signal that contain the first acoustic class of speech, and frames that contain the second acoustic class of speech.

When the first and second acoustic classes of the speech are voiced speech and unvoiced speech, there are several methods that can be used to identify voiced and unvoiced speech, for example: using a deep neural network (DNN), trained against a golden reference, for example using Praat software; performing an autocorrelation with unit delay on the speech signal (because voiced speech has a higher autocorrelation for non-zero lags); performing a linear predictive coding (LPC) analysis (because the initial reflection coefficient is a good indicator of voiced speech); looking at the zero-crossing rate of the speech signal (because unvoiced speech has a higher zero-crossing rate); looking at the short term energy of the signal (which tends to be higher for voiced speech); tracking the first formant frequency F0 (because unvoiced speech does not contain the first format frequency); examining the error in a linear predictive coding (LPC) analysis (because the LPC prediction error is lower for voiced speech); using automatic speech recognition to identify the words being spoken and hence the division of the speech into voiced and unvoiced speech; or fusing any or all of the above.

In the embodiments described further below, the first and second acoustic classes of the speech are voiced speech and unvoiced speech. However, the first and second acoustic classes of the speech may be any phonetically distinguishable acoustic classes. For example, they may be different phoneme classes, for example two different sets of vowels; they may be two different fricatives; or the first class may be fricatives while the second class are sibilants.

The received signal may be supplied to a voice activity detection block, and only supplied to the voiced/unvoiced detection block 72 when it is determined that it does contain speech. In that case, or otherwise when there is reason to believe that the audio signal contains only speech, the step of identifying periods when the audio signal contains unvoiced speech may comprise identifying periods when the audio signal contains voiced speech, and identifying the remaining periods of speech as containing unvoiced speech.

The voiced/unvoiced detection block 72 may for example be based on Praat speech analysis software.

The voiced/unvoiced detection block 72 thus outputs the first component of the audio signal, Sv, representing voiced speech and the second component, Su, representing unvoiced speech.

More specifically, in some embodiments, the first component of the audio signal, Sv, representing voiced speech and the second component, Su, representing unvoiced speech, are averaged spectra of the voiced and unvoiced components of the speech.

By averaged spectra are meant spectra of the speech obtained and averaged over multiple frames.

The spectra can be averaged over enough data to provide reasonable confidence in the information that is obtained about the speech signal. In general terms, this information will become more reliable as more data is used to form the average spectra.

In some cases, spectra averaged over 500 ms of the relevant speech will be enough to provide reliable averaged spectra. The length of time over which the averaged spectra are generated may be adapted based on the articulation rate of the speech, in order to ensure that the speech contains enough phonetic variation to provide a reliable average. The length of time over which the averaged spectra are generated may be adapted based on the content of the speech. If the user is speaking a predetermined known phrase, this may be more discriminative than speaking words of the user's choosing, and so a useful average can be obtained in a shorter period. The process illustrated in FIG. 3 may be performed regularly while the user is speaking, providing regularly updated information at the end of the method as more speech is received. It may then be judged that enough speech has been processed when the results of the method converge to stable values.

The signal received on the input 70 is also passed to a speaker recognition block 74, which performs a voice biometric process to identify the speaker, from amongst a plurality of enrolled speakers. The process of enrollment in a speaker recognition system typically involves the speaker providing a sample of speech, from which specific features are extracted, and the extracted features are used to form a model of the speaker's speech. In use, corresponding features are extracted from a sample of speech, and these are compared with the previously obtained model to obtain a measure of the likelihood that the speaker is the previously enrolled speaker.

In some situations, the speaker recognition system attempts to identify one or more enrolled speaker without any prior expectation as to who the speaker should be. In other situations, there is a prior expectation as to who the speaker should be, for example because there is only one enrolled user of the particular device that is being used, or because the user has already identified themselves in some other way.

In this illustrated example, the speaker recognition block 74 is used to identify the speaker. In other examples, there may be an assumption that the speaker is a particular person, or is selected from a small group of people.

In step 54 of the process shown in FIG. 3, the first and second components of the audio signal are compared with models of the first acoustic class (for example the voiced component) of the speech of an enrolled user and of the second acoustic class (for example the unvoiced component) of the speech of the enrolled user. For example, comparing the first and second components of the audio signal with the models of the voiced and unvoiced speech of the enrolled user may comprise comparing magnitudes of the audio signal at a number of predetermined frequencies with magnitudes in the models.

Thus, in the system shown in FIG. 4, one or more speaker model is stored, for example in a database. Based on the output of the speaker recognition block 74, or based on a prior assumption as to who the speaker is expected to be, one or more speaker model is selected.

In this embodiment, each speaker model contains separate models of the voiced speech and the unvoiced speech of the enrolled user. More specifically, the model of the voiced speech and the model of the unvoiced speech of the enrolled user each comprise amplitude values corresponding to multiple frequencies.

Thus, FIG. 5 shows a multiple speaker models.

Specifically, each speaker model shown in FIG. 5 comprises a long term averaged spectrum of the voiced components of the speech and a long term averaged spectrum of the unvoiced components of the speech. These models are obtained from the respective speakers during previous separate enrollment processes, during which the speakers speak, either uttering predetermined standard test phrases or saying words of their own choosing.

FIG. 5 shows the speaker models for five speakers, labeled Speaker 1-Speaker 5. The model for Speaker 1 comprises the long term averaged spectrum 90 of the voiced components of the speech and the long term averaged spectrum 91 of the unvoiced components of the speech; the model for Speaker 2 comprises the long term averaged spectrum 92 of the voiced components of the speech and the long term averaged spectrum 93 of the unvoiced components of the speech; the model for Speaker 3 comprises the long term averaged spectrum 94 of the voiced components of the speech and the long term averaged spectrum 95 of the unvoiced components of the speech; the model for Speaker 4 comprises the long term averaged spectrum 96 of the voiced components of the speech and the long term averaged spectrum 97 of the unvoiced components of the speech; and the model for Speaker 5 comprises the long term averaged spectrum 98 of the voiced components of the speech and the long term averaged spectrum 99 of the unvoiced components of the speech.

In each case, the model of the speech comprises a vector containing amplitude values at a plurality of frequencies.

The plurality of frequencies may be selected from within a frequency range that contains the most useful information for discriminating between speakers. For example, the range may be from 20 Hz to 8 kHz, or from 20 Hz to 4 kHz.

The frequencies at which the amplitude values are taken may be linearly spaced, with equal frequency spacings between each adjacent pair of frequencies. Alternatively, the frequencies may be non-linearly spaced. For example, the frequencies may be equally spaced on the mel scale.

The number of amplitude values used to form the model of the speech may be chosen depending on the frequency spacings. For example, using linear spacings the model may contain amplitude values for 64 to 512 frequencies. Using mel spacings, it may be possible to use fewer frequencies, for example between 10 and 20 mel-spaced frequencies.

Thus, the model of the voiced speech may be indicated as Mv, where Mv represents a vector comprising one amplitude value at each of the selected frequencies, while the model of the unvoiced speech may be indicated as Mu, where Mu represents a vector comprising one amplitude value at each of the selected frequencies.

As will be appreciated, the received signal, containing the user's speech, will be affected by the properties of the channel, which we take to mean any factor that produces a difference between the user's speech and the speech signal as generated by the microphone alters, and the received signal will also be affected by noise.

Thus, assuming that the channel and the noise are constant over the period during which the received signal is averaged to form the first and second components of the received speech, these first and second components can be expressed as:

Sv=αMv+n, and

Su=αMu+n,

where

α represents the frequency spectrum of a multiplicative disturbance component, referred to herein as the channel, and

n represents the frequency spectrum of an additive disturbance component, referred to herein as the noise.

Thus, with measurements Sv and Su, and with models Mv and Mu, these two equations can therefore be solved for the two unknowns, α and n.

Thus, for illustrative purposes,

${\alpha = \frac{\left( {{S\iota\iota} - {Sv}} \right)}{\left( {{M\iota\iota} - {Mv}} \right)}},{and}$ $n = {\frac{\left( {{SuMv} - {SvMu}} \right)}{\left( {{Mu} - {Mv}} \right)}.}$

For completeness, it should be noted that, with measurements of the spectrum made at a plurality of frequencies, these two equations are effectively solved at each of the frequencies.

Alternatively, with measurements made at f different frequencies, the equations Sv=αMv+n, and Su=αMu+n can each be regarded as f different equations to be solved.

In that case, having solved the equations, it may be useful to apply a low-pass filter, or a statistical filter such as a Savitzky-Golay filter, to the results in order to obtain low-pass filtered versions of the channel and noise characteristics.

As an alternative example, a least squares method may be used to obtain solutions to the 2f different equations.

It will be noted that the calculations set out above rely on determining the difference (Mu−Mv) between the model of the unvoiced speech and the model of the voiced speech. Where these are similar, for example in the range 1.3-1.6 kHz in the case of Speaker 1 in FIG. 5, then any small uncertainties in either of the models will potentially be magnified into large errors in the calculated values for the channel and/or the noise. Thus, the calculated values in any such frequency ranges may be given lower significance in any subsequent processing steps that use the calculated values, for example a reduced can weight applied to the values used in later processing steps. Alternatively, when it is known in advance that the model of the unvoiced speech and the model of the voiced speech are similar in a particular frequency range, the equations given above need not be solved for frequencies in this range.

Thus, as shown at step 56 of the process shown in FIG. 3, information is obtained about the channel and/or the noise affecting the audio signal.

This information can be used in many different ways.

FIG. 6 illustrates one such use. The system shown in FIG. 6 is similar to the system of FIG. 4, and the same reference numerals are used to refer to the same components of the system.

In the system of FIG. 6, the comparison block 78 is used to obtain information about the channel a that is affecting the received audio signal. Specifically, the comparison block 78 may be used to obtain the frequency spectrum of the channel. This can be used to compensate the received audio signal to take account of the channel.

For one example, FIG. 6 shows a channel compensation block 120, to which the audio signal received on the input 70 is supplied. The channel compensation block 120 also receives the frequency spectrum of the channel α. The channel compensation block 120 acts to remove the effects of the channel from the received signal, by dividing the received signal by the calculated channel α, before the received signal is passed to the speaker recognition block 74.

Thus, the output of the speaker recognition block 74, on the output 122, can be improved. That is, it can provide more reliable information about the identity of the speaker. This can then be supplied to a processing block 124 and used for any required purposes.

The output of the channel compensation block 120, containing the received signal after the effects of the channel have been removed, can be supplied to any suitable processing block 126, such as a speech recognition system, or the like.

FIG. 7 illustrates another such use. The system shown in FIG. 7 is similar to the system of FIG. 4, and the same reference numerals are used to refer to the same components of the system.

In the system of FIG. 7, the comparison block 78 is used to obtain information about the noise n that is affecting the received audio signal. Specifically, the comparison block 78 may be used to obtain the frequency spectrum of the noise. This can be used to take account of the noise when processing the received audio signal.

For one example, FIG. 7 shows a filter block 128, to which the audio signal received on the input 70 is supplied. The filter block 128 also receives the frequency spectrum of the noise n. The filter block 128 acts so as to ensure that noise does not adversely affect the operation of the speaker recognition block 74.

For example, the calculated noise characteristic, n, can be subtracted from the received signal before any further processing takes place.

In another example, where the level of noise exceeds a predetermined threshold level at one or more frequencies, such that the operation of the speaker recognition block 74 could be compromised, the filter block 128 can remove the corrupted components of the received audio signal at those frequencies, before passing the signal to the speaker recognition block 74. Alternatively, these components could instead be flagged as being potentially corrupted, before being passed to the speaker recognition block 74 or any further signal processing block.

Thus, the output of the speaker recognition block 74, on the output 122, can be improved. That is, it can provide more reliable information about the identity of the speaker. This can then be supplied to any suitable processing block 124, and used for any required purposes.

The output of the filter block 128, containing the received signal after the frequency components that are excessively corrupted by noise have been removed, can be supplied to any suitable processing block 130, such as a speech recognition system, or the like.

FIG. 8 illustrates another such use. The system shown in FIG. 8 is similar to the system of FIG. 4, and the same reference numerals are used to refer to the same components of the system.

In the system of FIG. 8, the comparison block 78 is used to obtain information about the channel α and the noise n that are affecting the received audio signal. Specifically, the comparison block 78 may be used to obtain the frequency spectrum of the channel and of the noise. This can be used to take account of the channel and the noise when processing the received audio signal.

For one example, FIG. 8 shows a combined filter block 134, to which the audio signal received on the input 70 is supplied. The combined filter block 134 also receives the frequency spectrum of the channel α and the noise n. The combined filter block 134 acts so as to ensure that channel effects and noise do not adversely affect the operation of the speaker recognition block 74.

For example, the calculated noise characteristic, n, can be subtracted from the received signal, and the remaining signal can be divided by the calculated channel α, before any further processing takes place.

Thus, the output of the speaker recognition block 74, on the output 122, can be improved. That is, it can provide more reliable information about the identity of the speaker. This can then be supplied to any suitable processing block 124, and used for any required purposes.

The output of the combined filter block 134, containing the received signal after the effects of the channel and the noise have been removed, can be supplied to any suitable processing block 136, such as a speech recognition system, or the like.

A further use of the information obtained about the channel and/or the noise affecting the audio signal is to overcome an attempt to deceive a voice biometric system by playing a recording of an enrolled user's voice in a so-called replay or spoof attack.

FIG. 9 shows an example of a situation in which a replay attack is being performed. Thus, in FIG. 9, the smartphone 10 is provided with voice biometric functionality. In this example, the smartphone 10 is in the possession, at least temporarily, of an attacker, who has another smartphone 30. The smartphone 30 has been used to record the voice of the enrolled user of the smartphone 10. The smartphone 30 is brought close to the microphone inlet 12 of the smartphone 10, and the recording of the enrolled user's voice is played back. If the voice biometric system is unable to determine that the enrolled user's voice that it recognizes is a recording, the attacker will gain access to one or more services that are intended to be accessible only by the enrolled user.

It is known that smartphones, such as the smartphone 30, are typically provided with loudspeakers that are of relatively low quality. Thus, the recording of an enrolled user's voice played back through such a loudspeaker will not be a perfect match with the user's voice, and this fact can be used to identify replay attacks.

FIG. 10 illustrates the frequency response of a typical loudspeaker. Thus, at frequencies below a lower threshold frequency f_(L), the loudspeaker suffers from low-frequency roll-off, as the bass response is limited by the size of the loudspeaker diaphragm. At frequencies above an upper threshold frequency f_(U), the loudspeaker suffers from high-frequency roll-off. At frequencies between the lower threshold frequency f_(L) and the upper threshold frequency f_(U), there is a degree of pass-band ripple, as the magnitude of the response varies periodically between β₁ and β₂.

The size of these effects will be determined by the quality of the loudspeaker. For example, in a high quality loudspeaker, the lower threshold frequency f_(L) and the upper threshold frequency f_(U) should be such that there is minimal low-frequency roll-off or high-frequency roll-off within the frequency range that is typically audible to humans. However, size and cost constraints mean that many commercially available loudspeakers, such as those provided in smartphones such as the smartphone 30, do suffer from these effects to some extent.

Similarly, the magnitude of the pass-band ripple, that is the difference between β₁ and β₂, will also depend on the quality of the loudspeaker.

If the voice of a speaker is played back through a loudspeaker whose frequency response has the general form shown in FIG. 10, then this may be detectable in the received audio signal containing the speech of that speaker. It has previously been recognized that, if a received audio signal has particular frequency characteristics, that may be a sign that the received audio signal is the result of a replay attack. However, the frequency characteristics of the received signal depend on other factors, such as the frequency characteristics of the speech itself, and the properties of any ambient noise, and so it is difficult to make a precise determination that a signal comes from a replay attack based only on the frequency characteristics of the received signal.

However, the method shown in FIG. 3, and described with reference thereto, can be used to make a more reliable determination as to whether a signal comes from a replay attack.

In one possibility, as shown in FIG. 7, the frequency characteristic of the ambient noise is determined, and this is subtracted from the received audio signal by means of the filter 128. The received signal, with noise removed, is supplied to a processing block 130, which in this case may be a replay attack detection block.

For example, the replay attack detection block may perform any of the methods disclosed in EP-2860706A, such as testing whether a particular spectral ratio (for example a ratio of the signal energy from 0-2 kHz to the signal energy from 2-4 kHz) has a value that may be indicative of replay through a loudspeaker, or whether the ratio of the energy within a certain frequency band to the energy of the complete frequency spectrum has a value that may be indicative of replay through a loudspeaker.

In another possibility, the method shown in FIG. 3 is used to determine the frequency characteristic of the channel that affects the received speech. If the speech has been played back through a loudspeaker, the frequency response of the loudspeaker should be visible in the frequency characteristic of the channel.

FIG. 11 is a flow chart, illustrating a method of determining whether the received signal may result from a replay attack.

In the method of FIG. 11, in step 140, an audio signal is received, representing speech.

In step 142, information is obtained about a channel affecting said audio signal. For example, the information about the channel may be obtained by the method shown in FIG. 3.

In step 144, it is determined whether the channel has at least one characteristic of a loudspeaker.

As shown at step 146, determining whether the channel has at least one characteristic of a loudspeaker may comprise determining whether the channel has a low frequency roll-off. For example, the low-frequency roll-off may involve the measured channel decreasing at a relatively constant rate, such as 6 dB per octave, for frequencies below a lower cut-off frequency f_(L), which may for example be in the range 50 Hz-700 Hz.

As shown at step 148, determining whether the channel has at least one characteristic of a loudspeaker may comprise determining whether the channel has a high frequency roll-off. For example, the high-frequency roll-off may involve the measured channel decreasing at a relatively constant rate, such as 6 dB per octave, for frequencies above an upper cut-off frequency f_(U), which may for example be in the range 18 kHz-24 kHz.

As shown at step 150, determining whether the channel has at least one characteristic of a loudspeaker may comprise determining whether the channel has ripple in a pass-band thereof. For example, this may comprise applying a Welch periodogram to the channel, and determining whether there is a predetermined amount of ripple in the characteristic. A degree of ripple (that is, a difference between β₁ and β₂ in the frequency response shown in FIG. 10) exceeding a threshold value, such as 1 dB, and with a peak-to-trough frequency of about 100 Hz, over the central part of the pass-band, for example from 100 Hz-10 kHz, can be regarded as characteristic of a loudspeaker.

For example, two or three of the steps 146, 148 and 150 may be performed, with the results being applied to a classifier, to determine whether the results of those steps are indeed characteristic of a loudspeaker frequency response.

As a further example, the channel frequency response can be applied as an input to a neural network, which has been trained to distinguish channels that are characteristic of loudspeakers from other channels.

If it is determined that the channel has a characteristic of a loudspeaker, then it may be determined, perhaps on the basis of other indicators too, that the received audio signal is the result of a replay attack. In that case, the speech in the received audio signal may be disregarded when attempting to verify that the speaker is the expected enrolled speaker.

The skilled person will recognize that some aspects of the above-described apparatus and methods may be embodied as processor control code, for example on a non-volatile carrier medium such as a disk, CD- or DVD-ROM, programmed memory such as read-only memory (Firmware), or on a data carrier such as an optical or electrical signal carrier. For many applications embodiments of the invention will be implemented on a DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit) or FPGA (Field Programmable Gate Array). Thus the code may comprise conventional program code or microcode or, for example code for setting up or controlling an ASIC or FPGA. The code may also comprise code for dynamically configuring re-configurable apparatus such as re-programmable logic gate arrays.

Similarly the code may comprise code for a hardware description language such as Verilog TM or VHDL (Very high speed integrated circuit Hardware Description Language). As the skilled person will appreciate, the code may be distributed between a plurality of coupled components in communication with one another. Where appropriate, the embodiments may also be implemented using code running on a field-(re)programmable analogue array or similar device in order to configure analogue hardware.

Note that as used herein the term module shall be used to refer to a functional unit or block which may be implemented at least partly by dedicated hardware components such as custom defined circuitry and/or at least partly be implemented by one or more software processors or appropriate code running on a suitable general purpose processor or the like. A module may itself comprise other modules or functional units. A module may be provided by multiple components or sub-modules which need not be co-located and could be provided on different integrated circuits and/or running on different processors.

Embodiments may be implemented in a host device, especially a portable and/or battery powered host device such as a mobile computing device for example a laptop or tablet computer, a games console, a remote control device, a home automation controller or a domestic appliance including a domestic temperature or lighting control system, a toy, a machine such as a robot, an audio player, a video player, or a mobile telephone for example a smartphone.

It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design many alternative embodiments without departing from the scope of the appended claims. The word “comprising” does not exclude the presence of elements or steps other than those listed in a claim, “a” or “an” does not exclude a plurality, and a single feature or other unit may fulfill the functions of several units recited in the claims. Any reference numerals or labels in the claims shall not be construed so as to limit their scope. 

1.-12. (canceled)
 13. A method of analysis of an audio signal, the method comprising: receiving an audio signal representing speech; extracting first and second components of the audio signal representing first and second acoustic classes of the speech respectively, the first acoustic class of speech being different to the second acoustic class of speech; analyzing the extracted first component of the audio signal with a first model of speech of an enrolled user in the first acoustic class and the extracted second component of the audio signal with a second model of speech of the enrolled user in the second acoustic class; and based on said analyzing, determining at least one of a property of a channel affecting the first and second components of said audio signal and a property of noise affecting the first and second components of said audio signal.
 14. A method according to claim 13, wherein the first and second acoustic classes are phonetically distinguishable acoustic classes of speech.
 15. A method according to claim 13, wherein the first and second acoustic classes each comprise one of the following classes: a) a phoneme class; b) a vowel class; c) a fricative class; d) a sibilant class; e) a voiced class; f) an unvoiced class.
 16. A method according to claim 13, wherein extracting first and second components of the audio signal comprises: identifying periods when the audio signal contains voiced speech; and identifying remaining periods of speech as containing unvoiced speech.
 17. A method according to claim 13, wherein analyzing the first and second components of the audio signal with the first and second models of the speech of the enrolled user comprises: comparing magnitudes of the audio signal at a number of predetermined frequencies with magnitudes in the first and second models.
 18. A method according to claim 13, comprising compensating the received audio signal for the property of the channel and/or the property of noise.
 19. A method according to claim 13, comprising: performing a speaker identification process on the received audio signal to form a provisional decision on an identity of a speaker; selecting the first and second models of the speech of the enrolled user, from a plurality of models, based on the provisional decision on the identity of the speaker; compensating the received audio signal for channel and/or noise; and performing a second speaker identification process on the compensated received audio signal to form a final on the identity of the speaker.
 20. A method according to claim 19, wherein compensating the received audio signal for channel and/or noise comprises: identifying at least one part of a frequency spectrum of the received audio signal where a noise level exceeds a threshold level; and ignoring the identified part of the frequency spectrum of the received audio signal when performing the second speaker identification process.
 21. A method according to claim 13, wherein the first and second acoustic classes of the speech comprise voiced speech and unvoiced speech.
 22. A method according to claim 13, wherein the first and second acoustic classes of the speech comprise first and second phoneme classes.
 23. A method according to claim 13, wherein the first and second acoustic classes of the speech comprise first and second fricatives.
 24. A method according to claim 13, wherein the first and second acoustic classes of the speech comprise fricatives and sibilants.
 25. A system for analysis of an audio signal, the system comprising an input for receiving an audio signal, and being configured for: receiving an audio signal representing speech; extracting first and second components of the audio signal representing first and second acoustic classes of the speech respectively, the first acoustic class of speech being different to the second acoustic class of speech; analyzing the extracted first component of the audio signal with a first model of speech of an enrolled user in the first acoustic class and the extracted second component of the audio signal with a second model of speech of the enrolled user in the second acoustic class; and based on said analyzing, determining at least one of a property of a channel affecting the first and second components of said audio signal and a property of noise affecting the first and second components of said audio signal.
 26. A non-transitory computer readable storage medium having computer-executable instructions stored thereon that, when executed by processor circuitry, cause the processor circuitry to perform a method according to claim
 13. 